{% extends 'base.html' %}

{% block title %}News Editor{% endblock %}
{% block content %}
    <form action="{{ request.path }}" method="POST">
    <br/>URL: <input type="text" name="url" value="{{ url }}" style="width: 100%;"/>
    <br/>Title: <input type="text" name="title" value="{{ title }}" style="width: 100%;"/>
    <br/>For test: <input type="checkbox" name="fortest" {% if fortest %} checked {% endif %}/>
    <br/>Header:
    <br/><textarea name="httpheader" style="width: 100%;height:30px;">{{ httpheader }}</textarea>
    <br/>Encoding: {{ encoding }}, from {{ encodingSrc }}
    {% if oldContent %}<pre>{{ oldContent }}</pre>{% endif %}
    <br/>Content:
    <br/><textarea name="content" style="width: 100%;height:30px;">{{ content|e }}</textarea>
    <br/><input type="submit" name="action" value="Submit" />
    </form>
    <pre style="width: 100%;">{{ pagestr }}</pre>
<br/> {{ elementResult and elementResult.element }}
<br/>Title: {{ elementResult and elementResult.text.title }}
<br/>Content:<br/><textarea style="width: 100%;height:30px;">{{ elementResult and elementResult.text.content | e }}</textarea>
<br/>Main:<br/><textarea style="width: 100%;height:30px;">{{ elementResult and elementResult.text.main | e}}</textarea>
{% endblock %}
